// -----------------------------------------------初始化----------------------------------------------

const express = require('express');
const router = express.Router();

const userCtrl = require('../controller/userCtrl.js');

// -----------------------------------------------渲染页面----------------------------------------------

// 注册
router.get('/register',userCtrl.showRegister);

// 登录
router.get('/login',userCtrl.showLogin);

// 注销
router.get('/logout',userCtrl.Logout);

// -----------------------------------------------数据库 页面交互----------------------------------------------

router.post('/register',userCtrl.Register);

// 登录
router.post('/login',userCtrl.Login)

// -----------------------------------------------导出----------------------------------------------

module.exports = router;